﻿@{
    Layout = null;
}
@using GN.Pay.GatewayWeb.Models
@model QRCodePayModel
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="~/Content/pay/core.css" rel="stylesheet" />
    <link href="~/Content/pay/payfor.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.signalR-2.2.1.js"></script>
    <title>微信扫码支付</title>
</head>
<body>
    <div class="gn_payfor_content">
        <div class="gn_payfor_top clearfix">
            <img class="left" src="~/Content/pay/img/logo.jpg" />
            <p class="left">@Model.CashierName</p>
            <img class="right" src="~/Content/pay/img/step3.jpg" />
        </div>
    </div>
    <div class="gn_payscan_detail">
        <div class="gn_payscan_box">
            <p class="gn_payscan_box_tips">
                @Model.ExpireMessage
            </p>
            <div class="gn_payscan_neibox clearfix">
                <div class="box-left left">
                    <p>商    家：@Model.MerchantName (@Model.AppName)</p>
                    <p>订 单 号：@Model.OrderNo</p>
                    <p>订单详情：@Model.Subject @Model.Body</p>                  
                </div>
                <div class="box-border left"></div>
                <div class="box-right left">
                    <p>微信扫一扫付款</p>
                    <p class="cff0000">￥ @Model.PayMoney.ToString("N2")</p>
                    <img src="@Model.QrCodePath" />
                </div>
            </div>
        </div>
    </div>    
    <script>              
        var connection = $.hubConnection();
        var notifyProxy = connection.createHubProxy('notifyHub');
        notifyProxy.on('notify', function (msg) {            
            var obj = JSON.parse(msg);
            location.href = "/Notify/WeiXin/OrderPayReturn?tradeNo=" + obj.tradeNo;
        });
        connection.start().done(function () {
            notifyProxy.invoke('registerApply','@Model.ApplyId');
        });
    </script>
</body>